<?php
    // Create product table

    $DB = mysqli_connect('ppt_mysql', 'root', 'root', 'ppt');
    try {
        $sql = "create table if not exists product (
            id int PRIMARY KEY AUTO_INCREMENT,
            title VARCHAR(255) NOT NULL,
            description VARCHAR(255),
            price int,
            created VARCHAR(255),
            updated VARCHAR(255)
        );";
        $DB->query($sql);
    } catch (Exception $exception) {
        echo $exception;
    }
    $DB->close();
    unset($DB);